<template>
	<view>
		<bg-video></bg-video>
		<cu-custom bgColor="bg-yellow" :isBack="true">
			<block class="text-white" slot="content">我的业务员</block>
		</cu-custom>

		<view>
			<view>
				<view class="padding-xs" v-for="(item, index) in azjs" :key="index">
					<view class="margin-sm shadow bg-white padding-xs relative">
						<view class="flex">
							<view class="w-100">
								<view class="padding-xs flex justify-between align-baseline text-lg">
									<text class="">{{item.zjname}}</text>
									<view class="flex justify-end">
										<view class="text-yellow">
											<text class="iconfont icon-huiyuanleixing"></text>
											<text>负责人</text>
										</view>
										<view class="margin-left-xs text-green">
											<text class="iconfont icon-my"></text>
											<text>我</text>
										</view>
									</view>
								</view>
								<view class="padding-xs flex justify-end align-baseline text-lg">
									<button @tap="toYwydetail(item.zjid)" class="bg-yellow margin-0" size="mini">详细</button>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>

			
			<view v-if="azjs.length == 0" class="padding text-center">
				<text>暂无记录</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data: function() {
			return {
				zjgsid: "",
				azjs: [],
				azj: this.store.state.zj,
			};
		},
		onLoad: function(option) {
			this.zjgsid = option.zjgsid;
			this.loadZjs();
		},
		methods: {
			loadZjs: function() {
				this.api("/zj/all/get").send({
					zjgsid: this.zjgsid
				}).then(data => {
					this.azjs = data.azjs;
				});
			},
			toYwydetail: function(zjid) {
				uni.navigateTo({
					url: '/pages/czj/ywy/detail?zjid='+zjid
				});
			}
		}
	};
</script>

<style>
</style>